package com.example.yk_fx.utils;

import com.example.yk_fx.entity.GiftEntity;
import com.example.yk_fx.entity.PlEntity;
import com.example.yk_fx.entity.ResultEntity;
import com.example.yk_fx.entity.VideoEntity;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface Api {
    @GET("/video/findVideos")
    Observable<VideoEntity> video(@Query("currentPage") int page,@Query("pageSize") int size);
    //点赞的接口
    @POST("/fav/love")
    Observable<ResultEntity> love(@Query("videoId") int videoId);
    //取消点赞的接口
    @POST("/fav/nolove")
    Observable<ResultEntity> nolove(@Query("videoId") int videoId);
    @GET("/comment/getCommentByVideoId")
    Observable<PlEntity> getPl(@Query("videoId") int videoId);
    @POST("/comment/comment")
    Observable<PlEntity> sendPl(@Body RequestBody body);
    @GET("/gift/json")
    Observable<GiftEntity> getgift();
}
